<?php

namespace App\Models\Common;

use App\Models\Member\Member;
use App\Models\Sys\User;
use Emadadly\LaravelUuid\Uuids;
use WeSoonNet\LaravelPlus\Traits\Timezone;
use Illuminate\Database\Eloquent\Model;

class ProcessService extends Model
{
    use Uuids, Timezone;

    protected $table        = 'com_process_service';
    protected $guarded      = ['created_at', 'updated_at'];
    protected $hidden       = ['pivot'];
    protected $casts        = [
        'created_at' => 'datetime:Y-m-d H:i:s',
        'updated_at' => 'datetime:Y-m-d H:i:s',
        'deleted_at' => 'datetime:Y-m-d H:i:s',
    ];

    public static $stateArr = [
        0 => '待审核',
        5 => '系统审核通过',
        10 => '人工审核通过',
        -10 => '人工审核不通过',
    ];

    /**
     * 审核表
     */
    public function process()
    {
        return $this->belongsTo(Process::class, 'process_uuid', 'uuid');
    }
}
